/**
 * InitHomecmd.java of SchoolManagement created by KK on date Jan 07, 2012
 * Copyright@ Shandilya Software Technologies 
 */
package com.school.homeServlet.cmd;

import java.io.IOException;
import java.util.logging.Logger;

import javax.servlet.RequestDispatcher;
import javax.servlet.ServletConfig;
import javax.servlet.ServletException;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;


import com.school.homeServlet.cmd.HomeCmd;

/**
 * @author KK
 *
 */
public class HomeCmd implements HomeCommand {

	
	/* (non-Javadoc)
	 * @see com.school.homeServlet.cmd.HomeCommand#processRequest(javax.servlet.http.HttpServletRequest, javax.servlet.http.HttpServletResponse, javax.servlet.ServletConfig)
	 */
	public static Logger log = Logger.getLogger(HomeCmd.class.getSimpleName());
	@Override
	public void processRequest(HttpServletRequest req,
			HttpServletResponse resp, ServletConfig config)
			throws ServletException, IOException {
		
		log.info("entered processRequest()+kkkkkkkkkkkkkkkkk");
		
		
/*		NewsDao newsobject1 = new NewsDaoImpl();
		ArrayList<News> schnews = newsobject1.viewSchoolNews();
		
		req.setAttribute("schoolnews", schnews);		//////////////using session for news
	*/	
		req.setAttribute("newRegistrationForm", false);
		req.setAttribute("contactUs", false);
		req.setAttribute("examSchedule", false);
		req.setAttribute("examResult", false);
		req.setAttribute("interviewSchedule", false);
		req.setAttribute("interviewResult", false);
		
		
		RequestDispatcher dispatcher = req.getRequestDispatcher("/school_home.jsp");
		dispatcher.forward(req, resp);
		
		log.info("exited processRequest()");

	}

}
